home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: January 12, 1997
- // Author: Sanjay Bakshi
- //
- // Description:
- // This creates a panel that has a projectLightEditor inside
- // of it.
- //
- // Input Arguments:
- // None.
- //
- // Return Value:
- // None.
- //
-
-
-
- global proc
- createProjectLightPanel (string $whichPanel)
- //
- // Description:
- // Define the editors that are used in this panel. No
- // controls (widgets) are created at this point.
- //
- {
- // create unique names for editors based on panel name
- //
- string $projectLightEd = ($whichPanel + "ProjectLightEd");
- projectLightEditor
- -unParent
- $projectLightEd;
- }
-
-
-
-
- global proc
- addProjectLightPanel (string $whichPanel)
- //
- // Description:
- // Add the panel to a layout.
- // Parent the editors to that layout and create any other
- // controls (widgets) required.
- //
- {
- string $projectLightEd = ($whichPanel + "ProjectLightEd");
-
- waitCursor -state on;
-
- formLayout baseForm;
- setParent baseForm;
-
- frameLayout
- -visible true
- -borderVisible false
- -labelVisible false
- -collapsable false
- -collapse true
- projLightFrame;
-
- // paneLayout -configuration "vertical2" -ps 1 35 100 projLightPane;
-
- columnLayout pane1;
- // setParent projLightPane;
- // formLayout pane2;
-
- // setParent pane1;
- projLightUI $projectLightEd;
-
- // setParent pane2;
- // modelEditor -cam persp;
-
-
- waitCursor -state off;
- }
-
- global proc
- removeProjectLightPanel (string $whichPanel)
- //
- // Description:
- // Remove the panel from a layout.
- // Delete controls.
- //
- {
- string $projectLightEd = ($whichPanel + "ProjectLightEd");
-
- if (`projectLightEditor -exists $projectLightEd`) {
- projectLightEditor -edit -unParent $projectLightEd;
- }
- }
-
- global proc
- deleteProjectLightPanel (string $whichPanel)
- //
- // Description:
- // This proc will delete the contents of the panel, but not
- // the panel itself.
- //
- // Note:
- // We only need to delete editors here. Other UI will be taken care of
- // by the remove proc.
- //
- {
- string $projectLightEd = ($whichPanel + "ProjectLightEd");
-
- if (`projectLightEditor -exists $projectLightEd`) {
- deleteUI -editor $projectLightEd;
- }
- }
-
- global proc string
- saveStateProjectLightPanel (string $whichPanel)
- //
- // Description:
- // This proc returns a string that when executed will restore the
- // current state of the panel elements.
- //
- {
- string $projectLightEd = ($whichPanel + "ProjectLightEd");
-
- return (
- `projectLightEditor -query -stateString $projectLightEd`
- );
- }
-
- global proc
- projectLightPanel (string $panelName)
- //
- // Description:
- // Create a new scripted fullGraphPanel. If the scripted
- // panel hasn't yet been defined then define it.
- //
- {
- global string $gMainPane;
-
- if (!`scriptedPanelType -exists projectLightPanel`) {
- //
- // Define the callbacks for the fullGraphPanel
- //
- scriptedPanelType
- -createCallback "createProjectLightPanel"
- -addCallback "addProjectLightPanel"
- -removeCallback "removeProjectLightPanel"
- -deleteCallback "deleteProjectLightPanel"
- -saveStateCallback "saveStateProjectLightPanel"
- projectLightPanel;
- }
-
- // instantiate a new fullGraphPanel
- //
- setParent $gMainPane;
- scriptedPanel -unParent -type projectLightPanel $panelName;
- }
-